package comp.config.repository;

import java.util.List;

import org.springframework.data.domain.*;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import comp.config.entity.*;

/**
 * This code is generated 
 */
public interface ConfigRepository extends com.justep.cloud.repo.BaseRepository<Config, String> {

	public java.util.List<comp.config.entity.Config> queryEntityByFkeyEquals(String fkey);

	public java.util.List<comp.config.entity.Config> queryEntityByFkeyLike(String fkey);

	@Query(value = "select w from Config w where w.fgroup = ( select distinct x.fgroup from Config x where x.fvalue = :fvalue and x.fkey = 'com.qq.weixin.miniapp.appID' )")
	public java.util.List<comp.config.entity.Config> findByAppId( @Param("fvalue") String fvalue);

	public java.util.List<comp.config.entity.Config> queryEntityByFgroupEquals(String fgroup);

	public java.util.List<comp.config.entity.Config> queryEntityByFkeyLikeAndFgroupEquals(String fkey,String fgroup);

	public java.util.List<comp.config.entity.Config> queryEntityByFkeyEqualsAndFgroupEquals(String fkey,String fgroup);

	public comp.config.entity.Config queryTopEntityByFvalueEqualsAndFkeyEquals(String fvalue,String fkey);

}

